#### Generate Figure: Education by Agreement (Republican) ####

fig8_dat = bind_rows(import(here("data","fig8_r_edu_agree_dat.rds")) |> 
                       mutate(agree = "Agree"),
                     import(here("data","fig8_r_edu_disagree_dat.rds")) |> 
                       mutate(agree = "Disagree")) |> 
  invert_group()


fig_r_agree = amce_scatterplot(fig8_dat, "Education", "darkgreen", -0.045, .5, "Agree")
fig_r_disagree = amce_scatterplot(fig8_dat, "Education", "darkgreen", -0.045, .5, "Disagree")

fig_r_scat = fig_r_agree + fig_r_disagree

print(fig_r_scat)

ggsave(here("figures","figure_8.png"), fig_r_scat,
       dpi = 600, units = "in", width = 10, height = 5)

ccat("See 'figure_8.png' for Figure 8 output")